/*
============================================================================
Name        : CVersificatorAppUi from VersificatorAppui.h
Author      : 
Version     :
Copyright   : Your copyright notice
Description : Declares UI class for application.
============================================================================
*/

#ifndef __VERSIFICATORAPPUI_H__
#define __VERSIFICATORAPPUI_H__

// INCLUDES
#include <aknviewappui.h>

// FORWARD DECLARATIONS
class CVersificatorView;
class CPluginInterface;
class CPlayerPlugin;
class CAknNavigationControlContainer;
class CAknNavigationDecorator;

// CLASS DECLARATION

class CVersificatorAppUi : public CAknViewAppUi
{
public: // // Constructors and destructor
	void ConstructL();
	~CVersificatorAppUi();


private: // From MEikMenuObserver
	void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
	void HandleCommandL(TInt aCommand);


private: //from CEikAppUi
	TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
	void HandleForegroundEventL(TBool aForeground);


private: //New functions
	void GetPlugins();
	void SetPluginL(CPluginInterface* aPlugin);
	
	void AddMenuItem(TInt aCommandId, TPtrC aText, CEikMenuPane* aMenuPane, TBool aDimmed);
	
	void SetVolume(TInt aVolume);


public: //public data
	// Current player adapter
	CPluginInterface* iCurrentPlugin;


private: //Data
	// List of plugin adapters
	RPointerArray<CPluginInterface> iPlugins;

	//Default plugin
	CPlayerPlugin* iPlayerPlugin;

	// Current view
	CVersificatorView* iAppView;

	//Volume controls
	CAknNavigationControlContainer* iNaviPane;
	CAknNavigationDecorator* iVolumeNavi;
	TInt iVolume;

};

#endif


